﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>产品列表</title>
<base href="<%=request.getContextPath()%>/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style/adminStyle.css" rel="stylesheet" type="text/css" />
<script type="text/JavaScript" src="ckeditor/ckeditor.js"></script>
</head>
<body>
 <div class="wrap">
  <div class="page-title">
    <span class="modular fl"><i class="add"></i><em>编辑/修改产品</em></span>
    <span class="modular fr"><a href="product_list.html" class="pt-link-btn">产品列表</a></span>
  </div>
  <form:form method="post" modelAttribute="invest" action="invest/update" enctype="multipart/form-data">
  <form:hidden path="proId"/>
  <table class="list-style">
   <tr >
    <td style="text-align:right;width:15%;">产品期数</td>
    <td><input name="proPeroids" type="text" class="textBox length-long" value="${invest.proPeroids}" /></td>
   </tr>
   <tr >
    <td style="text-align:right;">投资类型：</td>
    <!-- 
     <td>
    	 <select class="textBox" name="it.investtypeId">
    	 	<option>请选择</option>
    	 	<c:forEach var="investTypes" items="${itList}">
      		<option value="${investTypes.investtypeId}">${investTypes.investtypeName}</option>
      		</c:forEach>
     	</select>   
    </td>
     -->
   <td>
   <form:select path="it.investtypeId" items="${itList}" itemValue="investtypeId" itemLabel="investtypeName"></form:select>
   </td>
    
   </tr>
   <tr>
    <td style="text-align:right;">到期还款方式：</td>
    <td> 
    	<select class="textBox" name="rt.repaytypeId">
    	 		<c:forEach var="RepayType" items="${rbList}">
    	 			<c:choose>
    	 				<c:when test="${RepayType.repaytypeId==invest.rt.repaytypeId}">
    	 					<option value="${RepayType.repaytypeId}" selected="selected">${RepayType.repaytypeName}</option>
    	 				</c:when>
    	 				<c:otherwise>
    	 					<option value="${RepayType.repaytypeId}" >${RepayType.repaytypeName}</option>
    	 				</c:otherwise>
    	 			</c:choose>
      			</c:forEach>
     	</select>   
    </td>
   </tr>
   <tr>
    <td style="text-align:right;">预期年利率：</td>
    <td>
     <input name="proRate" type="text" class="textBox length-short" value=" ${invest.proRate}"/>
     <span>%</span>
    </td>
   </tr>
   <tr>
    <td style="text-align:right;">投资期限：</td>
    <td>
     <input name="investTime" type="text" class="textBox length-short" value="${invest.investTime}"/>
     <span>天</span>
    </td>
   </tr>
   <tr>
    <td style="text-align:right;">起投金额：</td>
    <td>
     <input type="text" class="textBox length-short" name="minMoney" value="${invest.minMoney}"/>    
     <span>元</span>
    </td>
   </tr>
   <tr>
    <td style="text-align:right;">最高可投：</td>
    <td>
     <input type="text" class="textBox length-short" name="maxMoney" value="${invest.maxMoney}"/>
     <span>元</span>
    </td>
   </tr>
     <tr>
    <td style="text-align:right;">剩余金额：</td>
    <td>
     <input type="text" class="textBox length-short" name="remainMoney" value="${invest.remainMoney}"/>
     <span>元</span>
    </td>
   </tr>
    <tr>
    <td style="text-align:right;">项目总额：</td>
    <td>
     <input type="text" class="textBox length-short" name="proTotal" value="${invest.proTotal}"/>
     <span>元</span>
    </td>
   </tr>
   <tr>
    <td style="text-align:right;">相关材料：</td>
    <td>
     <input type="file" class="textBox length-long" name="file" />
     <span>元</span>
    </td>
   </tr>
   
   <!-- 
    <tr>
    <td style="text-align:right;">产品关键词：</td>
    <td><input type="text" class="textBox length-long"/></td>
   </tr>
   <tr>
    <td style="text-align:right;">产品描述：</td>
    <td><input type="text" class="textBox length-long"/></td>
   </tr>
   <tr>
    <td style="text-align:right;">推荐至：</td>
    <td>
     <input type="checkbox" name="tuijian" id="jingpin"/>
     <label for="jingpin">精品</label>
     <input type="checkbox" name="tuijian" id="xinpin"/>
     <label for="xinpin">新品</label>
     <input type="checkbox" name="tuijian" id="rexiao"/>
     <label for="rexiao">热销</label>
    </td>
   </tr>
   
   <tr>
    <td style="text-align:right;">产品缩图片：</td>
    <td>
     <input type="file" id="suoluetu" class="hide"/>
     <label for="suoluetu" class="labelBtnAdd">+</label>
     <img src="#" width="60" height="60" class="mlr5"/>
    </td>
   </tr>
   
   <tr>
    <td style="text-align:right;">产品主图：</td>
    <td>
     <input type="file"  multiple="multiple" id="chanpinzhutu" class="hide"/>
     <label for="chanpinzhutu" class="labelBtn2">本地上传(最多选择N张)</label>
    </td>
   </tr>
   <tr>
    <td style="text-align:right;"></td>
    <td>
     <img src="#" width="80" height="80"/>
     <img src="#" width="80" height="80"/>
     <img src="#" width="80" height="80"/>
     <img src="#" width="80" height="80"/>
     <img src="#" width="80" height="80"/>
    </td>
   </tr>
   
   
    -->
  
   
   <tr>
    <td style="text-align:right;">项目介绍：</td>
    <td><form:textarea path="introduction" cssClass="ckeditor" /></td>
   </tr>
   <tr>
   <tr>
    <td style="text-align:right;">保障措施：</td>
    <td><form:textarea path="protection" cssClass="ckeditor"/></td>
   </tr>
   <tr>
    <td style="text-align:right;"></td>
    <td><input type="submit" value="保存" class="tdBtn"/></td>
   </tr>
  </table>
  </form:form>
 </div>
</body>
</html>